﻿using Idte.HumanResource.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Idte.Communication.Core
{
    public enum ConversationStatus
    {
        Pending,
        Complete,
        InProgress
    }

    public class Conversation<TParent, TKey> : Conversation
    {
        [ForeignKey("ParentId")]
        public TParent Parent { get; set; }
        public TKey ParentId { get; set; }
    }

    public class Conversation
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { get; set; }
        public Person Caller { get; set; }
        public Person Callee { get; set; }
        public string Content { get; set; }
        public DateTime? PlannedTime { get; set; }
        public TimeSpan? PlannedDuration { get; set; }
        public DateTime? ActualTime { get; set; }
        public TimeSpan? ActualDuration { get; set; }
        public ConversationStatus Status { get; set; }
    }
}
